package one.stand.controller;

import one.stand.model.ResultModel;
import one.stand.request.CompanyModuleConfigRequest;
import one.stand.response.CompanyModuleConfigResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 企业模块配置信息
 * Created by renz on 2019/8/27 11:20
 */
@RestController
@RequestMapping("company/companyModuleConfig")
public class CompanyModuleConfigController extends BaseController {

    @PostMapping("updateCompanyModuleConfig")
    public ResultModel<Boolean> updateCompanyModuleConfig(@RequestBody CompanyModuleConfigRequest request) {
        return companyModuleConfigService.updateCompanyModuleConfig(request);
    }

    /**
     * 获取企业模块配置信息
     */
    @PostMapping("findCompanyModuleConfigs")
    public ResultModel<List<CompanyModuleConfigResponse>> findCompanyModuleConfigs(@RequestBody CompanyModuleConfigRequest request) {
        return companyModuleConfigService.findCompanyModuleConfigs(request);
    }

}
